package com.spring.test.rabbitmq;

import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class Sender {
	@Autowired
	private AmqpTemplate rabbitTemplate;
	
	public void send(String msg){
		System.out.println("sender:" + msg);
		this.rabbitTemplate.convertAndSend("hello",msg);
	}
}
